import { Column, Entity, PrimaryColumn } from 'typeorm';

@Entity({ name: 'app_device_list' })
export class ApplyDeviceEntity {
    @PrimaryColumn('varchar', { name: 'device_sn', charset: 'utf8mb4', collation: 'utf8mb4_general_ci' })
    deviceSn: string;

    // 设备类型：机场1dock，机场2dock2，飞机aircraft，必填
    @Column({ name: 'device_type', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci'})
    deviceType: string;

    // 设备型号，必填
    @Column({name: 'device_model', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci', nullable: true})
    deviceModel: string;

    // 设备品牌，必填
    @Column({ name: 'device_brand', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci', nullable: true})
    deviceBrand: string;

    // 设备名称，必填
    @Column({ name: 'device_name', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci'})
    deviceName: string;

    // 设备地址，必填
    @Column({ name: 'device_address', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci'})
    deviceAddress: string;

    // 设备所属部门名称，必填
    @Column({ name: 'device_department', type: 'varchar', charset: 'utf8mb4', collation: 'utf8mb4_general_ci', nullable: true})
    deviceDepartment: string;

    // 设备状态： 正常1，不可用2，已删除3
    @Column('int', { name: 'status' })
    status: number;

}
